<!doctype html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <title>跳转提示</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <style type="text/css">
        * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }
        img {
            max-width: 100%;
        }
        body{
            background: #290C0C;
            font-family: '微软雅黑';
            color: #fff;
            font-size: 16px;
        }
    </style>
    <link rel="stylesheet" type="text/css" href="__CSS__/error.css" />
</head>
<body>
<div class="container">
    <div class="content">
        <div id="large-header" class="large-header">
            <canvas id="demo-canvas"></canvas>
            <h1 class="main-title">抱歉,出错啦!</h1>
            <div class="message-body">
                <p class="error"><?php echo($error); ?></p>
                <p class="detail"></p>
                <p class="jump">
                    <b id="wait"><?php echo($waitSecond); ?></b> 秒后页面将自动跳转
                </p>
            </div>
            <div class="message-action">
                <a class="btn" id="btn-now" href="<?php echo($jumpUrl); ?>">立即跳转</a>
                <a class="btn" id="btn-stop" onclick="stop()">停止跳转</a>
                <a class="btn" id="btn-now" href="<?php echo(U('Home/User/logout')); ?>">重新登录</a>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    (function(){
        var wait = document.getElementById('wait');
        var btn = document.getElementById('btn-now').href;
        var interval = setInterval(function(){
            var time = --wait.innerHTML;
            if(time <= 0) {
                location.href = btn;
                clearInterval(interval);
            };
        }, 2000);
        window.stop = function (){
            clearInterval(interval);
        }
    })();
</script>
    <script src="__JS__/RAF.js"></script>
    <script src="__JS__/error.js"></script>
</body>
</html>
